import { defineStore } from 'pinia';
import { CalendarConfigStates, CalendarConfigState } from './interface';

/**
 * 日历配置
 * 
 */

export const useCalendarConfig = defineStore('calendarConfig', {
    state: (): CalendarConfigStates => ({
        calendarConfig: {
            view: 'fiveWeek', // 日历视图
        },
        eventForm: {}, // 事项表单
    }),
    actions: {
        setCalendarConfig(data: CalendarConfigState){
            this.calendarConfig = data;
        },
        setEventForm(data: {}){
            this.eventForm = data;
        }
    }
})